{extend name="admin@public/base" /}
{block name="main-content"}
<div class="page-content">
    <div class="row maintop">
        <div class="col-xs-12 col-sm-2">
            <a href="{:url('admin/Admin/admin_group_add')}">
                <button class="btn btn-sm btn-danger">
                    <i class="ace-icon glyphicon glyphicon-plus bigger-110"></i>
                    添加用户组
                </button>
            </a>
        </div>
    </div>
    <div class="row">
        <div class="col-xs-12">
            <div>
                <form id="leftnav" name="leftnav" method="post" action="" >
                    <input type="hidden" name="checkk" id="checkk" value="1" /><!--用于判断操作类型-->
                    <table class="table table-striped table-bordered table-hover" id="dynamic-table">
                        <thead>
                            <tr>
                                <th class="center">ID</th>
                                <th class="center">用户组名</th>
                                <th class="center">状态</th>
                                <th class="center">添加时间</th>
                                <th class="center" style="border-right:#CCC solid 1px;">操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            {foreach name="auth_group" item="v"}
                            <tr>
                                <td class="center">{$v.id}</td>
                                <td class="center">{$v.title}</td>
                                <td class="center" id="h{$v.id}">
                                    {if condition="$v['status'] eq 1"}
                                    <a class="red open-btn" href="{:url('admin/Admin/admin_group_state')}" data-id="{$v.id}" title="已开启">
                                        <div id="zt{$v.id}"><button class="btn btn-minier btn-yellow">开启</button></div>
                                    </a>
                                    {else/}
                                    <a class="red open-btn" href="{:url('admin/Admin/admin_group_state')}" data-id="{$v.id}" title="已禁用">
                                        <div id="zt{$v.id}"><button class="btn btn-minier btn-danger">禁用</button></div>
                                    </a>
                                    {/if}
                                </td>
                                <td class="center">{$v.addtime|date='Y-m-d',###}</td>
                                <td class="center">
                                    <div class="hidden-sm hidden-xs action-buttons">
                                        <a class="blue" href="{:url('admin/Admin/admin_group_access',array('id'=>$v['id']))}" title="配置规则">
                                            <i class="ace-icon fa fa-cogs bigger-110"></i> 配置权限
                                        </a>
                                        <a class="green" href="{:url('admin/Admin/admin_group_edit',array('id'=>$v['id']))}" title="编辑">
                                            <i class="ace-icon fa fa-pencil-square-o bigger-110"></i> 编辑
                                        </a>
                                        <a class="red confirm-rst-url-btn" href="{:url('admin/Admin/admin_group_del',array('id'=>$v['id']))}" data-info="你确定要删除吗？" title="删除">
                                            <i class="ace-icon fa fa-trash-o bigger-110"></i> 删除
                                        </a>
                                    </div>
                                    <div class="hidden-md hidden-lg">
                                        <div class="inline position-relative">
                                            <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
                                                <li>
                                                    <a href="{:url('admin/Admin/admin_group_access',array('id'=>$v['id']))}" class="tooltip-success" data-rel="tooltip" title="" data-original-title="配置规则">
                                                        <span class="blue">
                                                            <i class="ace-icon fa fa-cog bigger-120"></i>配置规则
                                                        </span>
                                                    </a>
                                                </li>
                                                <li>
                                                    <a href="{:url('admin/Admin/admin_group_edit',array('id'=>$v['id']))}" class="tooltip-success" data-rel="tooltip" title="" data-original-title="修改">
                                                        <span class="green">
                                                            <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> 编辑
                                                        </span>
                                                    </a>
                                                </li>
                                                <li>
                                                    <a href="{:url('admin/Admin/admin_group_del',array('id'=>$v['id']))}"  data-info="你确定要删除吗？" class="tooltip-error confirm-rst-url-btn" data-rel="tooltip" title="" data-original-title="删除">
                                                        <span class="red">
                                                            <i class="ace-icon fa fa-trash-o bigger-120"></i> 删除
                                                        </span>
                                                    </a>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            {/foreach}
                        </tbody>
                    </table>
                </form>
            </div>
        </div>
    </div>
</div><!-- /.page-content -->
{/block}
